﻿@model IntroMVC4.Models.Domain.InputFromEdit
@{
    ViewBag.Title = "Tạo phiếu nhập";
    Layout = "~/Areas/AnnaKids/Views/Shared/_sbAdmin.cshtml";
}
<script type="text/javascript" src="@Url.Content("~/Scripts/bootstrap-datepicker.js")" charset="UTF-8"></script>
<script type="text/javascript" src="~/Scripts/bootstrap-dropdown-checkbox.js"></script>
<link href="~/Content/bootstrap/datepicker.css" rel="stylesheet" />
<link href="~/Content/bootstrap/bootstrap-dropdown-checkbox.css" rel="stylesheet" />
@using (Html.BeginForm("ThemSanPham", "Admin"))
{    
    
    <div class="panel panel-default">
        <div class="panel-heading clearfix">
            Thông Tin Chính
                <div class="btn-group pull-right">
                    <button class="btn btn-sm btn-primary marginbotton" type="submit">Lưu phiếu nhập</button></div>
        </div>
        <div class="panel-body">
            <div class="input-group date col-sm-8" id="dp3" data-date-format="mm-dd-yyyy">
                <span class="input-group-addon">Ngày nhập</span>
                <input class="form-control" type="text" readonly="">
                <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
            </div>
            <div class="clearfix"></div>
            <br />
            <div class="input-group col-sm-8">
                <span class="input-group-addon">Giá ship</span>
                <input class="form-control" type="number" maxlength="50" value="@Model.ShipPrice" id="ShipPrice" name="ShipPrice" />
            </div>
            <div class="clearfix"></div>
            <br />
            <div class="input-group col-sm-8">
                <span class="input-group-addon">Giá sản phẩm</span>
                <input class="form-control" type="number" maxlength="50" value="@Model.ProductsPrice" id="ProductsPrice" name="ProductsPrice" />
            </div>
            <div class="clearfix"></div>
            <br />
            <div class="input-group col-sm-8">
                <span class="input-group-addon">Tổng cộng</span>
                <input class="form-control" type="number" maxlength="50" value="@Model.TotalAmount" id="TotalAmount" name="TotalAmount" />
            </div>
            <div class="clearfix"></div>
            <br />
        </div>
    </div>
    <div class="panel panel-default">
        @*<div class="panel-heading">
            Thông tin chi tiết<div class="btn-group btn-group pull-right">
                <button class="pull-right btn btn-sm btn-primary" type="submit">Thêm sản phẩm</button>
                <div class="myDropdownCheckbox"></div>
            </div>
        </div>*@
        <div class="panel-heading clearfix">
            Thông tin chi tiết
            <div class="btn-group pull-right">
                <div class="myDropdownCheckbox"></div>
            </div>
        </div>
        <div class="panel-body">
            <div class="input-group col-sm-8">
                <span class="input-group-addon">Sản phẩm</span>
                @Html.DropDownList("ProductId", ViewData["Products"] as List<SelectListItem>, String.Empty, new { @class = "form-control" })
            </div>
            <div class="clearfix"></div>
            <br />
            <div class="input-group col-sm-8">
                <span class="input-group-addon">Số lượng</span>
                <input class="form-control" type="number" maxlength="50" value="@Model.Quantity" id="Quantity" name="Quantity" />
            </div>
            <div class="clearfix"></div>
            <br />

            @* <div data-bind='foreach: viewModelJS'>
                <input type="hidden" id="productId" name="productId" data-bind="value: ProductId" />
                <div data-bind='foreach: ListAttributeProduct'>
                    <div class="input-group col-sm-2">
                        <span class="input-group-addon" data-bind="text: Name"></span>
                        <input class="form-control" type="text" maxlength="10" data-bind="attr: { id: Name, name: Name, value: Value }" />
                    </div>
                </div>
                <button class="pull-right btn btn-small btn-primary" type="button" data-bind="click: $root.remoteAttributePro">Xóa thuộc tính</button>
                <div class="clearfix"></div>
                <br />
            </div>*@
        </div>

    </div>
}
<div>
    @Html.ActionLink("Back to List", "QuanLyPhieuNhap")
</div>
<script type="text/javascript">
    $(function () {
        $(".input-group.date").datepicker({ autoclose: true, todayHighlight: true });
        var tab = [
      { id: "1", label: "Forever.", isChecked: true },
      { id: "2", label: "I love cheese.", isChecked: true },
      { id: "3", label: "Meat for all", isChecked: false },
      { id: "4", label: "Again and again", isChecked: true },
      { id: "5", label: "Hey bro!", isChecked: true },
      { id: "6", label: "It's working?", isChecked: false },
      { id: "7", label: "Horse", isChecked: true },
      { id: "8", label: "z-index", isChecked: true },
      { id: "9", label: "language scala", isChecked: true },
      { id: "10", label: "Yahoo", isChecked: true },
      { id: "11", label: "yellow", isChecked: true },
      { id: "12", label: "Gooooooooooogle", isChecked: true },
      { id: "13", label: "NO WAY!", isChecked: false },
      { id: "14", label: "2 times?", isChecked: true }
        ];
        $('.myDropdownCheckbox').dropdownCheckbox({
            queryUrl: "/bootstrap-dropdown-checkbox/json/exemple_1.json",
            data: tab,
            autosearch: true,
            title: "Chọn sản phẩm",
            btnClass: "btn btn-sm btn-primary",
            hideHeader: false,
            templatetype: "2",
            templateId: "AddProduct",
            templatename: "Thêm sản phẩm"
        });
        $('#AddProduct').click(function () {
            alert("hello");
        });
        $('#btnAdd').click(function () {
            alert("hello1");
        });
        
    });
</script>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
